public class Manager extends Employee {
    private double monthlySalary; // 月薪
    private double bonus; // 奖金

    public Manager(String name, String empId, double monthlySalary, double bonus) {
        super(name, empId);
        this.monthlySalary = monthlySalary;
        this.bonus = bonus;
    }

    // 实现薪资计算（月薪+奖金）
    @Override
    public double calculateSalary() {
        return monthlySalary + bonus;
    }

    // 生成工资条
    @Override
    public String generatePaySlip() {
        return "=== 工资条 ===\n" +
                "员工姓名：" + getName() + "\n" +
                "员工工号：" + getEmpId() + "\n" +
                "员工类型：管理人员\n" +
                "月薪：" + monthlySalary + "元\n" +
                "奖金：" + bonus + "元\n" +
                "本月薪资：" + calculateSalary() + "元";
    }
}